#include "dataword.h"
#include <QVariant>

int Word::id() const
{
    return m_id;
}

void Word::setId(int newId)
{
    m_id = newId;
}

const std::string &Word::original() const
{
    return m_original;
}

void Word::setOriginal(const std::string &newOriginal)
{
    m_original = newOriginal;
}

const std::string &Word::translation() const
{
    return m_translation;
}

void Word::setTranslation(const std::string &newTranslation)
{
    m_translation = newTranslation;
}

const int &Word::vocabularyId() const
{
    return m_vocabularyId;
}

void Word::setVocabularyId(const int &newVocabularyId)
{
    m_vocabularyId = newVocabularyId;
}
void Word::parseRecord(const QSqlRecord& record)
{
    this->setId(record.value(0).toInt());
    this->setOriginal(record.value(1).toString().toStdString());
    this->setTranslation(record.value(2).toString().toStdString());
    this->setVocabularyId(record.value(3).toInt());
}
